package com.google.code.sysarch.v4.network;

import java.util.LinkedList;

public class NetworkCommandList {
	
	LinkedList<NetworkCommand> list = null;
	
	
	NetworkCommandList() {
		list = new LinkedList<NetworkCommand>();
	}
	
	synchronized void add(int command, int field) {
		list.addLast(new NetworkCommand(command, field));
	}
	
	synchronized NetworkCommand get() {
		if (list.size() == 0) return null;
		return list.remove(0);
	}
	

}
